const mongoose = require('mongoose');
// 从环境变量获取连接信息
const MONGODB_URI = process.env.MONGODB_URI || 'mongodb+srv://sh104024:SHIhui104024@cluster0.lvba9.mongodb.net/recruitment';
mongoose.connect(MONGODB_URI)
.then(() => {
    console.log('数据库连接成功');
})
.catch((err) => {
    console.log(err);
});

module.exports = mongoose;